package com.zw.yzk.kabu.mapper;

import com.zw.yzk.kabu.data.network.entity.CheckQrEntity;
import com.zw.yzk.kabu.model.CheckQrCodeModel;

import javax.inject.Inject;

/**
 * Created by zhanwei on 2017/3/15.
 */

public class CheckQrCodeMapper {

    @Inject
    public CheckQrCodeMapper() {
    }

    public CheckQrCodeModel transfer(CheckQrEntity entity) {
        CheckQrCodeModel model = new CheckQrCodeModel();
        model.setTicketType(entity.result.ticketType);
        model.setExhibitionId(entity.result.exhibitionId);
        model.setImage(entity.result.image);
        model.setId(entity.result.id);
        model.setCheckTicketTime(entity.result.checkTicketTime);
        model.setTotalPrice(entity.result.totalPrice);
        model.setPhoneNumber(entity.result.phoneNumber);
        model.setSerialNumber(entity.result.serialNumber);
        model.setExhibitionEndTime(entity.result.exhibitionEndtime);
        model.setPrice(entity.result.price);
        model.setCreateTime(entity.result.createTime);
        model.setCheckResult(entity.result.checkResult);
        model.setExhibitionStartTime(entity.result.exhibitionStartTime);
        model.setExhibitionAddress(entity.result.exhibitionAddress);
        model.setOrderState(entity.result.orderState);
        model.setTradeEndTime(entity.result.tradeEndTime);
        model.setUnifiedOrder(entity.result.unifiedOrder);
        model.setWxTransactionId(entity.result.wxTransactionId);
        model.setCheckCode(entity.result.checkCode);
        model.setQrCodeUrl(entity.result.qrCodeUrl);
        model.setCount(entity.result.count);
        model.setName(entity.result.name);

        return model;
    }
}
